As widely-used recent standards for video compression techniques, there are, for example, H.261 and H.263 bp the ITU-T (International Telecommunication Union Telecommunication Standardization Sector), MPEG (Moving Picture Experts Group)-1, MPEG-2, MPEG-4, etc. by the ISO/IEC (International Organization for Standardization/International Electrotechnical Commission), and H.264/MPEG-4 AVC (Advanced Video Coding) by the JVT (Joint Video Team) as a joint team of the ITU-T and the MPEG. Furthermore, the next-generation video compression technique is now under consideration by the ITU-T, the ISO/IEC, and so on.
In general, one of the important elements of a video compression technique is inter-picture prediction involving motion compensation intended to compress the amount of information by reducing temporal redundancies between plural consecutive images that make up video. The inter-picture prediction involving motion compensation is a coding method involving (i) detecting the amount and direction of a motion in a reference image located forward or backward of a current image that is to be coded in units of an image block, (ii) generating a prediction image (hereinafter also referred to as “a motion compensation block” or “an inter prediction block”), and (iii) coding a difference value between the prediction image and the current image.
The information indicating how much and to what direction a motion compensation block in the current image to be coded is moved in the reference image located forward or backward of the current image is referred to as a motion vector. An image to be referred to is called as a reference image. The motion compensation block is capable of having an independent motion vector and a reference image. The image block necessary for motion compensation is referred to as a reference block
In the inter-picture prediction involving motion compensation according to H.264/MPEG-4 AVC, seven patterns of rectangular motion compensation blocks including 16×16, 16×8, 8×16, 8×8, 8×4, 4×8, 4×4, are used.
Meanwhile, there are motion compensation techniques (hereinafter also referred to as “polygonal motion compensation” or “non-rectangular motion compensation”) which adaptively changes the shape or size of a motion compensation block according to the characteristics of an image and the like in order to achieve better coding efficiency for the inter-picture prediction involving motion compensation proposed as the next-generation video compression technique in ITU-T, ISO/IEC, and so on (NPL 1, NPL 2, PTL 1, and PTL 2).
FIG. 42 shows an example of macroblock segment described in PTL 2. As shown in FIG. 42, a macroblock is segmented geometrically and each of the inter prediction blocks is decoded. In addition, FIG. 43 is a flow chart of an exemplary method of decoding the inter prediction blocks resulting from geometrical segmentation described in PTL 2.
Referring to FIG. 43, a method 100 generally shows an exemplary method of decoding the inter prediction blocks resulting from the geometrical segmentation.
The method 100 includes a starting block 112 for transferring control to a functional block 114. The functional block 114 determines whether or not a current mode type is a geometric mode type. When the current mode type is the geometric mode, the control is transferred to the functional block 116. When the current mode type is not the geometric mode, the control is transferred to an end block 120.
The functional block 116 decodes a geometric partition parameter (when, for example, proximity geometric data is available for prediction, the proximity geometric data is used to properly adapt a coding table and transfer the control to a functional block 118. The functional block 118 decodes a partition inter prediction (when, for example, proximity decoded data is available for prediction, the proximity decoded data is used to properly adapt a coding table) and transfer the control to the end block 120.
In addition, there is conventionally a motion compensation apparatus that uses a cache memory for improving memory access performance when reading a reference block (see, for example, PTL 3). FIG. 44 is a detailed flowchart of the process of determining whether or not a reference macroblock straddles a cache line boundary, and the process of changing a preload designation address, which are performed by the conventional motion compensation apparatus described in PTL 3. FIG. 45 is a diagram explaining a method of setting a preload designation address performed by a conventional motion compensation apparatus described in PTL 3, when a reference macroblock straddles the cache line boundary.
FIG. 44 is a detailed flowchart of the process of determining whether or not a reference macroblock straddles a cache line boundary, and the process of changing a preload designation address. The following describes FIG. 44 with reference to the explanation diagram of FIG. 45 for the address when the reference macroblock straddles the cache line boundary. First, in FIG. 45, it is assumed that a starting address of the uppermost row in a reference macroblock is the address A and the final address in the row is the address B. The cache line boundary is at the address C. Since the address C is positioned between the address A and the address B, it is determined that the reference macroblock straddles the cache line boundary; that is, the row of the reference macroblock includes the cache line boundary.
In Step S21 of FIG. 44, the top address in the row of the reference cache line boundary macroblock is calculated and the address is determined as the address A, and in Step S22, the final address in the row of the reference macroblock is calculated and the address is determined as the address B. Then in Step S 23, whether or not the cache line boundary is present between the address A and the address B is determined. When it is determined that the cache line boundary is present, the address is calculated as the address C. In Step S24, it is determined that the cache line boundary is straddled, and in Step S25, the preload designation address; that is the top address in preloading, is changed from the address A in the conventional example into the address C. When the cache line boundary is not present between the address A and the address B, it is determined that the cache line boundary is not straddled in Step S26, and in Step S27, the preload designation address is determined as being the top address in the row; that is the address A.
As described in FIG. 45, when the reference macroblock straddles the cache line boundary, the preload top address is set as the address C, so that a previous region of the perform; that is, the region A in FIG. 45 is not to be preloaded in the decoding process on a macroblock this time. Thus, there is a possibility of cache miss according to the region A; however, it is more likely that a macroblock close to a left end is a preloaded macroblock than a macroblock closer to a right end in a macroblock in the reference frame image even taking a motion vector into account, by employing a macroblock scanning method in the raster order; that is, by decoding starting from a macroblock at the left end in the row.
Accordingly, since the region A is positioned at the left end of the reference macroblock in FIG. 45, it is highly likely that data in the region A has already preloaded in the cache memory. According to PTL 3, it is expected that cache miss is prevented from occurring by issuing a data preloading instruction according to the characteristics of video data processing.